#ifndef pathNode_h_
#define pathNode_h_

class Node {

  public:
    //CONSTRUCTORS
    Node();
    Node(int xx, int yy, bool w = true);
    ~Node();

    //ACCESSORS
    int getx() const;
    int gety() const;
    int getg() const;
    int geth() const;
    int getf() const; // h + g
    bool getw() const; //gets walkable
    Node* getp() const;

    //MODIFIERS
    int calch(int tarx, int tary); //Update estimated distance to target
    void setg(int newg);
    void setp(Node* newp); // Set parent
    void setw(bool neww);

    //OPERATORS
    Node& operator=(const Node &nde);
    bool operator==(const Node &nde) const;
    bool operator!=(const Node &nde) const;
    bool operator<(const Node &nde) const;
    bool operator>(const Node &nde) const;

    //DEBUG
    void print();

  private:
    //X and Y are assuming a width of 1
    int x;
    int y;
    int g; //Cost of parent's g + movement here
    int h;
    bool walkable;
    Node* parent;

};



#endif
